include(../../cmake/use-ubscan)
add_exe_link_flag("-static -Wl,-Ttext=0x71000000 -e __linker_start")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
    add_exe_link_flag("-Wl,--image-base=0x70000000")
  endif()
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  add_exe_link_flag("-Wl,--image-base=0x70000000")
endif()
add_binary(ld-plos)
target_link_libraries(ld-plos c-base-s)
